home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
351-375
/
359
/
dice
/
dice.lzh
/
lib
/
string
/
strstr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-28
|
357b
|
26 lines
/*
* STRSTR.C find one string in another
*
* (c)Copyright 1990, Matthew Dillon, All Rights Reserved
*/
#include <string.h>
#include <errno.h>
char *
strstr(s1, s2)
const char *s1;
const char *s2;
{
short len2 = strlen(s2);
while (*s1) {
if (*s1 == *s2 && strncmp(s1, s2, len2) == 0)
return(s1);
++s1;
}
return(NULL);
}